Modular Contracts with Procedures, Annotations, Pointcuts and Advice

نویسندگان

  • Henrique Rebêlo
  • Ricardo Lima
  • Gary T. Leavens
چکیده

There are numerous mechanisms for modularizing design by contract at the source code level. Three mechanisms have been the main focus of attention, metadata annotations, pointcuts and advice. The latter two are well-known aspect-oriented programming mechanisms, and according to the literature, fare better in achieving contract modularization. However, previous efforts aimed at supporting contract modularity actually hindered it. In this paper we report an enhanced use of pointcuts and advice, and show how crosscut programming interfaces (XPIs) can significantly improve contract modularity. In addition, we also discuss how these XPIs can be used together with annotations to tackle the pointcut fragility problem and minimize the limited enforcement of XPI interface rules. We compare our approach with the literature’s in terms of code locality, well-defined interfaces, reusability, changeability, fragility, and pluggability.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Separation of Concerns with Procedures, Annotations, Advice and Pointcuts

There are numerous mechanisms for separation of concerns at the source code level. Three mechanisms that are the focus of recent attention – metadata annotations, pointcuts and advice – can be modeled together with good old-fashioned procedures as providing different kinds of bindings: procedure calls bind program points to operations, annotations bind attributes to program points; pointcuts bi...

متن کامل

An Overview of AspectJ

AspectJTM is a simple and practical aspect-oriented extension to JavaTM. With just a few new constructs, AspectJ provides support for modular implementation of a range of crosscutting concerns. In AspectJ’s dynamic join point model, join points are well-defined points in the execution of the program; pointcuts are collections of join points; advice are special method-like constructs that can be...

متن کامل

Open Modules: A Proposal for Modular Reasoning in Aspect-Oriented Programming

This paper makes two contributions to a formal understanding of aspect-oriented programming. First, we define TinyAspect, a formal model capturing core AOP concepts. Compared to previous formalizations of AOP constructs, TinyAspectis extremely small, models aspects at the source level, and is defined using structured operational semantics and syntax-directed typing rules. In combination, these ...

متن کامل

Open Modules: Modular Reasoning in Aspect-Oriented Programming

Aspect-oriented programming (AOP) is a new programming paradigm whose goal is to more cleanly modularize crosscutting concerns such as logging, synchronization, and event notification which would otherwise be scattered throughout the system and tangled with functional code. However, while AOP languages provide promising ways to separate crosscutting concerns, they can also break conventional en...

متن کامل

Modular Reasoning with Join Point Interfaces Modular Reasoning with Join Point Interfaces

In current aspect-oriented systems, aspects usually carry, through their pointcuts, explicit references to the base code. Those references are fragile and give up important software engineering properties such as modular reasoning and independent evolution of aspects and base code. A well-studied solution to this problem consists in separating base code and aspects using an intermediate interfa...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2011